home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Freeware / Miro 1.0 / Miro_Installer.exe / Miro_Downloader.exe / httpauth.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2007-11-12  |  1.1 KB  |  32 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.5)
  3.  
  4. import itertools
  5. from dl_daemon import command
  6. import eventloop
  7. requestIdGenerator = itertools.count()
  8. waitingHTTPAuthCallbacks = { }
  9.  
  10. def handleHTTPAuthResponse(id, authHeader):
  11.     callback = waitingHTTPAuthCallbacks.pop(id)
  12.     callback(authHeader)
  13.  
  14.  
  15. def findHTTPAuth(callback, host, path):
  16.     id = requestIdGenerator.next()
  17.     waitingHTTPAuthCallbacks[id] = callback
  18.     daemon = daemon
  19.     import dl_daemon
  20.     c = command.FindHTTPAuthCommand(daemon.lastDaemon, id, host, path)
  21.     c.send()
  22.  
  23.  
  24. def askForHTTPAuth(callback, host, path, authScheme):
  25.     id = requestIdGenerator.next()
  26.     waitingHTTPAuthCallbacks[id] = callback
  27.     daemon = daemon
  28.     import dl_daemon
  29.     c = command.AskForHTTPAuthCommand(daemon.lastDaemon, id, host, path, authScheme)
  30.     c.send()
  31.  
  32.